package com.bw.controller;


import com.bw.bean.Student;
import com.bw.service.SugarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
public class SugarController {

    @Autowired
    SugarService Sugarservice;


    @GetMapping("/findAll")
    public List<Student> findAll() {
        return Sugarservice.finAll();
    }
    @GetMapping("/findById")
    public Student findById(Integer id) {
        return Sugarservice.findById(id);
    }
}
